from selenium.webdriver.common.by import By

from base import Base

class Page(Base):
    # 点击搜索框
    def page_sou_1(self):
        loc = (By.XPATH,'//android.widget.TextView[@text="搜索菜谱"]')
        ele = self.find_ele(loc)
        return ele

    # 输入内容
    def page_srnr_2(self):
        loc = (By.CLASS_NAME,'android.widget.EditText')
        ele = self.find_ele(loc)
        return ele

    # 点击搜索按键
    def page_sosanj_3(self):
        loc = (By.ANDROID_UIAUTOMATOR,'new UiSelector().text("搜索")')
        ele = self.find_ele(loc)
        return ele

    # 断言_评分最高
    def page_pfzu_1(self):
        loc = (By.XPATH,'//android.widget.TextView[@text="评分最高"]')
        ele = self.find_ele(loc)
        return ele
